#pragma once

#include "znx_thread_base.h"

#define ZNX_ARRAY_MIN_NALLOC        8

typedef struct {
    void            *elts;
    size_t          size;
    uint64_t        nelts;
    uint64_t        nalloc;
} znx_array_t;


znx_array_t *znx_array_create(uint64_t n, size_t size);
void znx_array_destroy(znx_array_t *a);
void *znx_array_push(znx_array_t *a);
void znx_array_pop(znx_array_t *a);
void znx_array_remove(znx_array_t *a, uint64_t index);

